package net.spider.analyze;

import net.spider.entity.ContentEntity;

public class AnalyzeBuilder {

	public static ContentEntity analyze(Analyzable a) {
		ContentEntity entry = new ContentEntity();
		a.analyze();
		if (a instanceof VideoAnalyze) {
			VideoAnalyze va = (VideoAnalyze) a;
			entry.setThumbnail(va.getThumbnail());
		}
		if (a instanceof BaseAnalyze) {
			BaseAnalyze ba = (BaseAnalyze) a;
			entry.setTitle(ba.getTitle());
		}
		return entry;
	}

}
